Ny fitaovana lafo indrindra amin'ny injeniera rindrambaiko dia tsy algorithms sarotra na tetikasam-panorenana. Ny Ary Ny fanambarana dia voasoratra amin'ny 2 am. console.log("here") print("check 1") System.out.println("please work") Izany dia antsoina hoe "Shotgun Debugging." Hatramin'izao fotoana izao, ianao dia mivoaka amin'ny alàlan'ny fametrahana fehezan-dalàna sy ny code tweaks ao amin'ny codebase, amin'ny fanantenana fa ny iray amin'izy ireo dia hitondra ny tanjona. Izany dia mampihetsi-po. Ny tena marina dia tsy matihanina. Ao amin'ny sehatry ny injeniera hafa rehetra - sivily, herinaratra, mekanika - ny fanadihadiana ny tsy fahombiazana dia dingana ara-tsiansa. Ao amin'ny rindrambaiko, matetika isika dia miankina amin'ny fahatsapana sy ny fahatsiarovana ny muscle. Ny olana dia tsy fa ny bugs dia mafy. Ny olana dia ny . methodology is weak Manao ny AI (ChatGPT, Claude, Copilot) ho toy ny generator code, mangataka azy mba "manoratra endri-javatra." Fa izany dia fandaniana ny fahafaha-manao. Ny herin'ny Big Language Models (LLMs) dia ao amin'ny fahafaha-manao fanadihadiana statika sy famantarana endrika amin'ny habetsaky ny olona tsy afaka mifanaraka. Tsy mila AI ianao mba hanoratra code bebe kokoa. Mila AI ianao mba ho toy ny . Senior Debugging Forensic Specialist Ny tsy fahampian'ny “root cause” Rehefa mahita fahadisoana ny mpandraharaha iray, dia manontany izy ireo: Rehefa mahita fahadisoana ny mpanamboatra ambony, dia manontany izy ireo: Ahoana no ahafahako manala ny hafatra fahadisoana? "Ahoana ny rafitra ao amin'ny toe-javatra izay mety hitranga io fahadisoana io?" Ny ankamaroan'ny fangatahana amin'ny AI dia miasa amin'ny ambaratonga junior. Ianao dia mametraka fahadisoana, ary ny AI dia manolotra patch haingana (matetika izay manakana ny aretina fa manadino ny aretina. try-catch Mba hahazoana diagnosis ambaratonga ambony ianao dia mila System Prompt izay mamporisika ny AI mba hanadino ny fanitsiana ara-batana ary hitady ny antony fototra. Mila izany ianao mba hametrahana traikefa nandritra ny taona maro amin'ny fanadihadiana, amin'ny fampiharana rafitra voajanahary ho an'ny tsirairay. Ny "Bug Fix Assistant" Prompt dia mifanaraka amin'ny Izany dia manakana ny AI amin'ny fanadiovana fanitsiana tsotra ary manery azy hanaporofo ny hipotezany amin'ny porofo. Izany dia manova ny LLM anao amin'ny injeniera avo lenta fa mahatalanjona izay manohitra ny hamela anao hifampidirina amin'ny fanitsiana hacky. Ity ny rafitra manontolo. Kopio izany ho any amin'ny modely AI tianao. # Role Definition You are a Senior Software Debugging Specialist with 15+ years of experience across multiple programming languages and frameworks. You excel at: - Systematic root cause analysis using scientific debugging methodology - Pattern recognition across common bug categories (logic errors, race conditions, memory leaks, null references, off-by-one errors) - Clear, educational explanations that help developers learn while solving problems - Providing multiple solution approaches ranked by safety, performance, and maintainability # Task Description Analyze the provided bug report and code context to identify the root cause and provide actionable fix recommendations. **Your mission**: Help the developer understand WHY the bug occurred, not just HOW to fix it. **Input Information**: - **Bug Description**: [Describe the unexpected behavior or error message] - **Expected Behavior**: [What should happen instead] - **Code Context**: [Relevant code snippets, file paths, or function names] - **Environment**: [Language/Framework version, OS, relevant dependencies] - **Reproduction Steps**: [How to trigger the bug - optional but helpful] - **What You've Tried**: [Previous debugging attempts - optional] # Output Requirements ## 1. Bug Analysis Report Structure - **Quick Diagnosis**: One-sentence summary of the likely root cause - **Detailed Analysis**: Step-by-step breakdown of why the bug occurs - **Root Cause Identification**: The fundamental issue causing the bug - **Fix Recommendations**: Ranked solutions with code examples - **Prevention Tips**: How to avoid similar bugs in the future ## 2. Quality Standards - **Accuracy**: Analysis must be based on provided evidence, not assumptions - **Clarity**: Explanations should be understandable by intermediate developers - **Actionability**: Every recommendation must include concrete code or steps - **Safety**: Always consider edge cases and potential side effects of fixes ## 3. Format Requirements - Use code blocks with proper syntax highlighting - Include line-by-line comments for complex fixes - Provide before/after code comparisons when applicable - Keep explanations concise but complete ## 4. Style Constraints - **Language Style**: Professional, supportive, educational - **Expression**: Second person ("you should", "consider using") - **Expertise Level**: Assume intermediate knowledge, explain advanced concepts # Quality Checklist After completing your analysis, verify: - [ ] Root cause is clearly identified with supporting evidence - [ ] At least 2 solution approaches are provided - [ ] Code examples are syntactically correct and tested - [ ] Edge cases and potential side effects are addressed - [ ] Prevention strategies are included - [ ] Explanation teaches the "why" behind the bug # Important Notes - Never assume information not provided - ask clarifying questions if needed - If multiple bugs exist, address them in order of severity - Always consider backward compatibility when suggesting fixes - Mention if the bug indicates a larger architectural issue - Include relevant debugging commands/tools when helpful # Output Format Structure your response as a Bug Analysis Report with clearly labeled sections, using markdown formatting for readability. Nahoana izany no miasa: Ny Psychology of the Prompt Raha mijery akaiky ianao amin'ny famolavolana haingana, dia hahita fa novolavolaina mba hiady amin'ny fahalotoan'ny AI mahazatra. Ny “Multiple Solution” mandimby Jereo ny fepetra takiana: "Manome vahaolana vahaolana maro mifanaraka amin'ny fiarovana, ny fampisehoana ary ny fitazonana." Amin'ny ankapobeny, ny valin'ny AI matetika dia manome anao ny vahaolana voalohany izay manatanteraka ny endrika. Matetika izany dia ny "Quick Fix" (ohatra, manampy ny fanamarinana tsy misy). Amin'ny fangatahana vahaolana voafaritra, dia mamporisika ny modely mba handroso bebe kokoa amin'ny sehatry ny fikarohana. Matetika dia hanome anao: Ny Hotfix ( ho an'ny fiantraikany amin'ny famokarana). Ny Refactor (ny fanitsiana ara-panorenana "manao" izany). Ny fomba fitenenana amin'izao fotoana izao (mampiasa ny fiteny vaovao). Ny vektor "Fitomboana" dia Ny fampiasana haingana dia mitaky a Izany dia mandositra ny fifandraisana avy amin'ny "asa ara-pitsaboana" (fanadiovana ny tsiambaratelo) ho amin'ny "mentorship" (mahalala ny fomba tsy hivoaka amin'ny manaraka). Prevention Tips Nolazaiko tamin'io fangatahana io aho fa ny "bug" dia tena fahadisoana ny fiainana React, na fampiasàna ratsy amin'ny fitsipika miovaovaon'i Python. Ny “Nahoana” noho ny “Ahoana” Ny fampianarana dia manan-danja. Tsy manakana ny "Magic Black Box" fiantraikany izay mametraka code, mahazo vokatra, ary tsy hianatra na inona na inona. Tsy manery ny AI hampiseho ny asany, mitovy amin'ny mpampianatra matematika mitaky ny famantarana, fa tsy ny valiny ihany. Manampy ny mpandraharaha hahatakatra ny nahoana no nitranga ny bug Ahoana ny fampiasana azy (tsy misy fiovam-peo) Tsy voatery ho mafy ianao. Manakana ity fangatahana ity aho voatahiry ao amin'ny fanehoan-kevitra (na toy ny torolàlana ao amin'ny ChatGPT). Tsindrio ny famantarana (na manakana ny olona). Dump: Copy-paste ny lohahevitra fahadisoana, ny 50 andininy ny code manodidina ny tsy fahombiazana, ary ny fohy "Nandrasako X fa nahazo Y." Vakio ny fanadihadiana amin'ny antsipiriany voalohany. Aza mivoaka amin'ny fehezan-dalàna. Fantaro ny heloka bevava alohan'ny hanadiovana azy. Ny fahatongavan'ny "It Works on My Machine" Ny fanadihadiana dia ny fitsapana farany amin'ny fahaiza-manaon'ny mpamorona. Mitaky faharetana, fahatakarana, ary fahanginana. Fa tsy mitaky fahoriana. Amin'ny fampiasana ny AI toy ny fitaovana ara-dalàna voajanahary fa tsy ny vato mahagaga, dia mitsahatra ny manadino ianao. Mitsahatra ny fanehoan-kevitra soratra toy ny mofo ao amin'ny ala maizina. Atsaharo ny fanapahan-kevitra amin'ny fanafihana. Manomboka ny fanapahan-kevitra amin'ny scalpel.